﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;
using System.Data;
using System.Data.SqlClient;
using NHibernate.Exceptions;



namespace Mapeo
{
    public class CrearEntidad : Controlador
    {
        public override void Start()
        {
            using (ISession Sesion = m_SessionFactory.OpenSession())
            {
                using (ITransaction Trans = Sesion.BeginTransaction())
                {
                    try
                    {
                        Sesion.Save(base.m_ObjectFlow);
                        Trans.Commit();
                    }
                    catch (Exception ex)
                    {
                        Trans.Rollback();
                    }
                }
            }
        
        }
    }
}
